<template>
  <div class="padding-lr20 bg-ff">
    <div class="record_li flex padding-tb20" v-for="(item,index) in article" :key="index">
      <img class="radius-50p margin-r24" v-if="item.head_img" :src="item.head_img" alt />
      <img class="radius-50p margin-r24" v-if="!item.head_img" src="@/assets/img/nologin.png" alt />
      <div class="flex-grow flex flex-column text-content">
        <div class="rem-30px overflow-hidden">
          <span class="fl">{{item.user_phone}}</span>
          <span class="fr">提交了代理申请了代理</span>
        </div>
        <div class="rem-24px overflow-hidden">
          <span class="fl c-99">{{item.enterprise_title}}</span>
          <span class="fr c-99">{{item.created_at}}</span>
        </div>
      </div>
    </div>
    <load
      @loadData="getArticle"
      :list="article"
      :total="total"
      :nodata="article.length <= 9 ? true : false"
    ></load>
  </div>
</template>

<script>
import load from "../components/load";
export default {
  components: {
    load
  },
  data() {
    return {
      article: [],
      id: this.$route.query.id,
      total: 0
    };
  },
  mounted() {
    this.getArticle(1);
  },
  methods: {
    // 浏览记录
    getArticle(page) {
      let ajaxurl = "/wap/info/apply";
      this.$axios.post( ajaxurl, {
        enterprise_id: this.id,
        page: page,
        limit: 10
      }).then(res => {
        if (page == 1) {
          this.list = [];
          this.topList = [];
        }
        if (res.data.data.length == 0) {
          this.total++;
          return false;
        }
        for (let i in res.data.data) {
          this.article.push(res.data.data[i]);
        }
      });
    }
  }
};
</script>


<style scoped>
.record_li img {
  width: 0.94rem;
  height: 0.94rem;
}
</style>